
public class Encryptor {
  public <X> void encrypt(char[] input, X first, EncryptClass<X> enc, X[] output)
  {
	  if (input.length < 1) return;
	  output[0] = enc.f(first, input[0]);
	  if (input.length == 1) return;
	  output[1] = enc.f(first, input[1]);
	  for (int i = 2; i < input.length; i++) {
		  output[i] = enc.f(output[i-2], input[i]);
	  }
  }
}
